﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HomeworkOpp
{
    public class Battery
    {
        private string model;
        private int idleHours;
        private int hoursTalk;

        public Battery()
        {
        }

        public Battery(string model, int idleHours, int hoursTalk)
        {
            this.model = model;
            this.idleHours = idleHours;
            this.hoursTalk = hoursTalk;
        }
        public string Model
        {
            get { return this.model; }
            set { this.model = value; }
        }
        public int IdleHours
        {
            get { return this.idleHours; }
            set {
                if (this.IdleHours < 0)
                {
                    throw new ArgumentException("IdleHours must be positive");
                }
                this.idleHours = value; }
        }
        public int HoursTalk
        {
            get { return this.hoursTalk; }
            set {
                if (this.HoursTalk < 0)
                {
                    throw new ArgumentException(" HoursTalk must be positive");
                }
                this.hoursTalk = value; }
        }
    }
}
